#include "Gutter.h"

Gutter::Gutter(void) : ds::Node("Gutter",true) {	
	m_Grid = new ds::ScreenQuad("Grid","TexturesMaterial",2048);	
	gEngine->getWorld().attachNode(m_Grid,"Background");	
	int x = 0;
	int y = 0;
	for ( int j = 0; j < 30; ++j ) {
		if ( j % 2 == 0 ) {
			y = 0;
		}
		else {
			y = 23;
		}
		for ( int i = 0; i < 18; ++i ) {
			m_Grid->add(x,y,54,50,ds::Rect(260,500,54,50));
			y += 45;
		}
		x += 38;
	}
}

Gutter::~Gutter(void) {
}

void Gutter::update(float elapsed) {
	/*
	m_Selection->clear();
	for ( int x = 0 ; x < MAX_X; ++x ) {
		for ( int y = 0; y < MAX_Y; ++y ) {
			int s = m_Pieces.get(x,y);
			if ( s == 2 ) {
				int xp = START_X + x * 35;
				int yp = START_Y + y * 35;
				m_Selection->add(ds::Vec3(xp,yp,1),ds::Vec3(35,35,0),ds::Rect(72,290,35,35));						
			}
		}
	}
	m_Selection->rebuild();
	*/
}
